package com.buba.record.controller;


import com.buba.pojo.record.BloodRoutineExaminatio;
import com.buba.pojo.record.Convention;
import com.buba.pojo.record.Liver;
import com.buba.record.service.ConventionService;
import com.buba.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 常规报告表 前端控制器
 * </p>
 *
 * @author testjava
 * @since 2022-06-09
 */
@RestController
@RequestMapping("/record/convention")
public class ConventionController {

    @Autowired
    private ConventionService conventionService;

    //肝功能报告
    @GetMapping("/live/{id}")
    public R live(@PathVariable Integer id){
        Liver live = conventionService.live(id);
        return R.ok().data("live" , live);
    }

    //血清报告
    @GetMapping("/blood/{id}")
    public R blood(@PathVariable Integer id){
        BloodRoutineExaminatio blood = conventionService.blood(id);
        return R.ok().data("blood" , blood);
    }

    //常规报告
    @GetMapping("/convention/{id}")
    public R convention(@PathVariable Integer id){
        Convention convention = conventionService.convention(id);
        return R.ok().data("convention" , convention);
    }

}

